package org.soenea.doitall.domain.model.invite;

import java.util.Calendar;

import org.dsrg.soenea.domain.DomainObjectCreationException;
import org.dsrg.soenea.domain.MapperException;
import org.dsrg.soenea.domain.proxy.DomainObjectProxy;
import org.dsrg.soenea.domain.user.IUser;
import org.soenea.doitall.domain.model.group.IGroup;
import org.soenea.doitall.domain.model.invite.mapper.InviteInputMapper;
import org.soenea.doitall.domain.model.person.IPerson;
import org.soenea.doitall.domain.model.person.mapper.PersonInputMapper;

public class InviteProxy extends DomainObjectProxy<Long, Invite> implements
		IInvite {

	public InviteProxy(Long id) {
		super(id);
	}

	@Override
	public IGroup getGroup() {
		return getInnerObject().getGroup();
	}

	@Override
	public void setGroup(IGroup group) {
		getInnerObject().setGroup(group);
	}

	@Override
	public InviteStatus getStatus() {
		return getInnerObject().getStatus();
	}

	@Override
	public void setStatus(InviteStatus status) {
		getInnerObject().setStatus(status);
	}

	@Override
	protected Invite getFromMapper(Long id) throws MapperException,
			DomainObjectCreationException {
		try {
	    return InviteInputMapper.find(id);
	   } catch (Exception e) {
	    throw new DomainObjectCreationException(e.getMessage(), e);
	   }
	}

	@Override
	public IPerson getInviter() {
		// TODO Auto-generated method stub
		return getInnerObject().getInviter();
	}

	@Override
	public void setInviter(IPerson inviter) {
		// TODO Auto-generated method stub
		getInnerObject().setInviter(inviter);
	}

	@Override
	public IPerson getInvited() {
		// TODO Auto-generated method stub
		return getInnerObject().getInvited();
	}

	@Override
	public void setInvited(IPerson invited) {
		// TODO Auto-generated method stub
		getInnerObject().setInvited(invited);
	}

}
